<!DOCTYPE html>

<script>
if (window.testRunner)
    testRunner.dumpAsText();

var log = [];
setTimeout(function() {
    log.push(1);
    document.getElementById("sheet").remove();
    log.push(2);
}, 1);
</script>

<link id="sheet" rel="stylesheet" href="http://127.0.0.1:8000/misc/resources/slow-stylesheet.cgi">

<p>Test that removing the last script blocking resource doesn't synchronously run script.</p>
<p id="output"></p>

<script>
document.getElementById("output").textContent = (log.toString() == "1,2") ? "PASS" : "FAIL";
</script>
